package day20.feifei;

import java.util.concurrent.*;

public class ExecutorsPool2 {
    public static void m1() throws Exception {
        //
        ExecutorService threadPool = Executors.newFixedThreadPool(3);
        Future<Object> future = threadPool.submit(new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                return "雨晴";
            }
        });
        Object o=future.get();
        System.out.println(o);
        threadPool.shutdown();

    }

    public static void main(String[] args) throws Exception {
        m1();
    }
}
